<%--
  Created by IntelliJ IDEA.
  User: 迷路的麋鹿
  Date: 2018/4/12
  Time: 15:54
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
    <form action="login.jsp" method="post">
        账号：<input type="text" name="name">
        密码：<input type="password" name="password">
        <input type="submit">
    </form>
    <%=session.getId()%>
<%
    String name=request.getParameter("name");
    String password=request.getParameter("password");
    if (!(name==null||"".equals(name)||password==null)||"".equals(password)){
        if (name.equals("pml")&&password.equals("111")){
            session.setAttribute("name",name);
            response.setHeader("refresh","2,url=welcome.jsp");
            %>
    <h3>登录成功！</h3>
            <%

        }else{
            %>
    <h3>密码错误</h3>
    <%
            }

    }
%>
</body>
</html>
